package com.tanhua.manager.controller;

import com.tanhua.domain.db.Freeze;
import com.tanhua.manager.service.ManageService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.http.ResponseEntity;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
@RequestMapping("/manage")
public class FreezeController {

    @Autowired
    private ManageService manageService;

    @PostMapping(value = "/users/freeze", name = "用户冻结操作")
    public ResponseEntity usersFreeze(@RequestBody Freeze freeze) {
        return manageService.usersFreeze(freeze);
    }
    @PostMapping(value = "/users/unfreeze", name = "用户解冻操作")
    public ResponseEntity usersUnfreeze(@RequestBody Freeze freeze) {
        return manageService.usersUnfreeze(freeze);
    }
}
